package Date1205;

import java.util.Scanner;

public class Demo4_1 {  
  
    public static void main(String[] args) {  
    	Scanner scanner = new Scanner(System.in);
    	int num = scanner.nextInt();
    	int[] numArray = new int[num];
    	int index = 0;
    	for(int i=0;i<num;i++){
    		numArray[i] = scanner.nextInt();
    	}
    	int findNum = scanner.nextInt();
    	for(int k=0;k<numArray.length;k++){
    		if(numArray[k] == findNum){
    			index = k+1;
    			break;
    		}
    	}
    	if(index > 0){
    		System.out.println(index);
    	}else {
			System.out.println(index-1);
		}
    }  
}
